home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / sos3-2.lha / bin / sos-cgc < prev    next >
Text File  |  1992-02-13  |  993b  |  32 lines

  1. #!/bin/sh
  2. # --------------------------------------------------------------------------
  3. # Copyright 1992 by Forschungszentrum Informatik (FZI)
  4. #
  5. # You can use and distribute this software under the terms of the licence
  6. # you should have received along with this program.
  7. # If not or if you want additional information, write to
  8. # Forschungszentrum Informatik, "STONE", Haid-und-Neu-Strasse 10-14,
  9. # D-7500 Karlsruhe 1, Germany.
  10. # --------------------------------------------------------------------------
  11. # 'sos-cgc - 27:02:91 - Dietmar Theobald'
  12. #
  13. # sos_cgc
  14. #
  15. # SOS garbage collection on container level.
  16. #
  17. # The command must be run in 'single user mode', i.e. no containers must be
  18. # accessible during the run.
  19. # Unfortunately, container files must always be writable, even if they are only
  20. # opened for reading.
  21. #
  22.  
  23. used="`sos-dmp -c`"
  24.  
  25. for ct in ${SOSCONTAINER?}/[0-9]*
  26. do
  27.    bn=`basename $ct`
  28.    echo "$used" | grep -s "\<$bn\>"  || { echo "sos-cgc: removing $ct"
  29.                       rm $ct
  30.                     }
  31. done
  32.